home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dskut / l_rmnd17.zip / REMIND_2.BAT < prev    next >
DOS Batch File  |  1990-03-01  |  9KB  |  157 lines

  1. echo off
  2. rem
  3. rem ╔════════════════════════════════════════════════════════════════════════╗
  4. rem ║ First, we display a warning message if our hard disk is more than      ║
  5. rem ║ 75% full (/df:*:75).  The * matches the default disk drive.  To specify║
  6. rem ║ the "C:" drive, you could use "/df:C:75".  The                         ║
  7. rem ║ /c:7070F4 demonstrates the use of a different color combination, and   ║
  8. rem ║ /ns turns off the sound effects.                                       ║
  9. rem ║                                                                        ║
  10. rem ║ If the disk IS filling up, then we run the PCMANAGE program to         ║
  11. rem ║ compress the disk.  To run the program only if it has been more        ║
  12. rem ║ than 5 days since it was last run then change the /i:0 to /i:5.        ║
  13. rem ║                                                                        ║
  14. rem ║ The file r2_full.msg looks like this:                                  ║
  15. rem ║                                                                        ║
  16. rem ║      Warning, this disk is %P percent full!                            ║
  17. rem ║                                                                        ║
  18. rem ║      (Press any key to continue...)                                    ║
  19. rem ║                                                                        ║
  20. rem ╚════════════════════════════════════════════════════════════════════════╝
  21. lcg_rmnd /i:0 /df:*:75 /c:7070f4 /m:r2_full.msg /ns /d:r2_pcman.dat
  22. if not errorlevel 1 goto :CHECK1
  23. echo -----------------------------------------
  24. echo Beginning PCMANAGE compression program...
  25. echo pcmanage
  26. lcg_rmnd /reset /d:r2_pcman.dat 
  27. echo -----------------------------------------
  28. :CHECK1
  29. rem
  30. rem ╔════════════════════════════════════════════════════════════════════════╗
  31. rem ║ Next, we use LCG/Remind to ask whether or not to load                  ║
  32. rem ║ our print spooler.  Using /i:0 ensures that it will trigger every      ║
  33. rem ║ time the system is reboot.  The /l:5 gives us 5 seconds to answer the  ║
  34. rem ║ question.  If no answer is given, the default is to go ahead and load  ║
  35. rem ║ the spooler.                                                           ║
  36. rem ║                                                                        ║
  37. rem ║ The file r2_spool.msg looks like this:                                 ║
  38. rem ║                                                                        ║
  39. rem ║      Would you like to load the 64K                                    ║
  40. rem ║      print spooler?  %C                                                ║
  41. rem ╚════════════════════════════════════════════════════════════════════════╝
  42. lcg_rmnd /i:0 /m:r2_spool.msg /l:5
  43. if errorlevel 4 goto :CHECK1
  44. if errorlevel 3 goto :NOSPOOL
  45. echo ------------------------
  46. echo Loading print spooler...
  47. echo superspl lpt1:/m=64
  48. echo ------------------------
  49. :NOSPOOL
  50. rem 
  51. rem ╔═══════════════════════════════════════════════════════════════════╗
  52. rem ║ This runs our disk optimizer, VOPT.EXE no more than once per day  ║
  53. rem ║ (/i:1), and only if it is before 10:00 AM (/tb:1000).             ║
  54. rem ║          LCG/Remind will track using the date file r2_vopt.dat. No║
  55. rem ║ message will be displayed (/m:).  If the program triggers the     ║
  56. rem ║ errorlevel will be set to 1, otherwise it will be set to 0.       ║
  57. rem ╚═══════════════════════════════════════════════════════════════════╝
  58. lcg_rmnd /i:1 /d:r2_vopt.dat /m: /tb:1000
  59. if not errorlevel 1 goto :CHECK2
  60. echo -----------------------------
  61. echo Beginning the Vopt program...
  62. echo vopt c:
  63. lcg_rmnd /reset /d:r2_vopt.dat 
  64. echo -----------------------------
  65. :CHECK2
  66. rem 
  67. rem ╔════════════════════════════════════════════════════════════════════╗
  68. rem ║                                                                    ║
  69. rem ║ In general, we do a complete back-up once a month, or whenever     ║
  70. rem ║ we accumulated more than 1 MB of new files.  We do incremental     ║
  71. rem ║ back-ups every 5 days.  The next command line will trigger on      ║
  72. rem ║ the first of each month (/e:01), or, if we are out of the          ║
  73. rem ║ office on the first, will trigger at least every 33 days, or       ║
  74. rem ║ whenever there is more than 5 MB of data on the c: drive in        ║
  75. rem ║ files with their archive bit set (/kt:5000 /pa:a:c:\*.*), but      ║
  76. rem ║ NOT if there has been a complete backup in the past 4 days (/n:4). ║
  77. rem ║ When triggered, it will display the following multiple choice      ║
  78. rem ║ message (/m:r2_month.msg):                                         ║
  79. rem ║                                                                    ║
  80. rem ║           You last made a complete disk backup                     ║
  81. rem ║           on %d, and there are %f files that have                  ║
  82. rem ║           changed since then (%k KB of data).                      ║
  83. rem ║                                                                    ║
  84. rem ║              1 -- Quit                                             ║
  85. rem ║              2 -- Make an incremental backup (new files only)      ║
  86. rem ║              3 -- Make a complete disk backup                      ║
  87. rem ║                                                                    ║
  88. rem ║              Your Choice -- %c                                     ║
  89. rem ║                                                                    ║
  90. rem ║ LCG/Remind will return an errorlevel of 0 if not triggered, or,    ║
  91. rem ║ if triggered will set it according to the answer to the            ║
  92. rem ║ question displayed.  Because this is a complicated question we     ║
  93. rem ║ will allow 180 seconds for an answer (/l:180).                     ║
  94. rem ║                                                                    ║
  95. rem ╚════════════════════════════════════════════════════════════════════╝
  96. lcg_rmnd /i:33 /e:01 /n:4 /kt:5000 /pa:a:c:\*.* /d:r2_all.dat /m:r2_month.msg /l:180
  97. if errorlevel 4 goto :CHECK2
  98. if errorlevel 3 goto :COMPLETE
  99. if errorlevel 2 goto :NEWONLY
  100. if errorlevel 1 goto :DONE
  101. goto :CHECK3
  102. :COMPLETE
  103. echo ----------------------------
  104. echo Beginning complete backup...
  105. echo pcbackup all.set
  106. lcg_rmnd /reset /d:r2_all.dat 
  107. echo ----------------------------
  108. goto :DONE
  109. :CHECK3
  110. rem 
  111. rem ╔════════════════════════════════════════════════════════════════════╗
  112. rem ║ The next series will "force" a backup if it has been more than 10  ║
  113. rem ║ days, suggest one every Monday, or if it has been more than 5 days,║
  114. rem ║ and show a friendly message if the backup has been within the past ║
  115. rem ║ 5 days.  It determines this by examining the data files r2_all.dat ║
  116. rem ║ (created everytime a complete backup is made), and r2_new.dat      ║
  117. rem ║ (created everytime an incremental backup of the new files is made).║
  118. rem ║                                                                    ║
  119. rem ║ The file r2_force.msg contains this message:                       ║
  120. rem ║                                                                    ║
  121. rem ║           The last disk backup was %n days                         ║
  122. rem ║           ago (on %d).                                             ║
  123. rem ║                                                                    ║
  124. rem ║           A new backup is overdue.                                 ║
  125. rem ║                                                                    ║
  126. rem ║ The file r2_ask.msg contains this message:                         ║
  127. rem ║                                                                    ║
  128. rem ║           Your hard disks have not been backed                     ║
  129. rem ║           up in %n days (since %d).                                ║
  130. rem ║                                                                    ║
  131. rem ║           Would you like to run your backup                        ║
  132. rem ║           program now? %c                                          ║
  133. rem ║                                                                    ║
  134. rem ║ The file r2_nice.msg looks like this:                              ║
  135. rem ║